home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Unix / CNews / Source / rna / makefile < prev    next >
Encoding:
Makefile  |  1991-01-05  |  2.9 KB  |  118 lines

  1. # australian readnews makefile
  2. # =()<NEWSARTS = @<NEWSARTS>@>()=
  3. NEWSARTS = /usr/spool/news
  4. # =()<NEWSBIN = @<NEWSBIN>@>()=
  5. NEWSBIN = /usr/lib/newsbin
  6. # =()<NEWSCTL = @<NEWSCTL>@>()=
  7. NEWSCTL = /usr/lib/news
  8. # workaround for System V make bug
  9. SHELL = /bin/sh
  10.  
  11. DEFINES=
  12. COPTS=-O
  13. CFLAGS=$(COPTS) $(DEFINES) -I../include
  14. INSTALL=:# install bigpdp
  15. NFLAG =
  16. LINT = lint -ha $(DEFINES)
  17. I=/usr/include
  18. C=/lib/libc.a
  19. LIBS=../libcnews.a bsearch.o
  20. BIN=/bin
  21. BINDIR=$(BIN)
  22.  
  23. COMMANDS = postnews uurec readnews uusend expire postgroup
  24. FILES = help
  25. LCOMMANDS = postnews.lint uurec.lint readnews.lint uusend.lint expire.lint
  26. # PFILES = header.c postnews.c funcs.c active.c history.c maketime.c
  27. PFILES = header.c funcs.c active.c history.c maketime.c
  28. RFILES = header.c readnews.c funcs.c active.c newsrc.c history.c maketime.c
  29. ROFILES= header.o readnews.o funcs.o active.o newsrc.o
  30. EFILES = expire.c funcs.c active.c
  31.  
  32. .c.lint:
  33.     $(LINT) $< > $@
  34.  
  35. .c:
  36.     $(CC) $(CFLAGS) $*.c $(NFLAG) -o $(@F)
  37.     $(INSTALL) $* bin 711 $@
  38.  
  39. .sh:
  40.     $(INSTALL) -c $*.sh bin 755 $@
  41.  
  42. all: readnews checknews postnews
  43.     chmod +x checknews postnews
  44.  
  45. readnews: $(ROFILES) defs.h $(LIBS)
  46.     $(CC) $(CFLAGS) $(LDFLAGS) $(ROFILES) $(PRE) $(LIBS) $(POST) -o $@
  47.  
  48. newsinstall:
  49.     : "install all control files; don't overwrite any!"
  50.     -if test ! -r $(NEWSCTL)/readnews.help; then cp news.help $(NEWSCTL)/readnews.help; fi
  51.  
  52. # bininstall: make directories, install programs
  53. bininstall:    readnews postnews checknews
  54.     cp readnews $(BINDIR)
  55.     cp checknews $(BINDIR)
  56.     cp postnews $(BINDIR)
  57.     cp postnews $(NEWSBIN)/inject
  58.  
  59. cmp:    readnews checknews postnews
  60.     cmp $(BINDIR)/readnews readnews
  61.     cmp $(BINDIR)/checknews checknews
  62.     cmp $(BINDIR)/postnews postnews
  63.     cmp $(NEWSBIN)/inject/postnews postnews
  64.  
  65. check:    readnews checknews postnews
  66.     cmp $(BINDIR)/readnews readnews || true
  67.     cmp $(BINDIR)/checknews checknews || true
  68.     cmp $(BINDIR)/postnews postnews || true
  69.     cmp $(NEWSBIN)/inject/postnews postnews || true
  70.  
  71. lint: $(LCOMMANDS)
  72.  
  73. help: $(NEWSCTL)/help
  74. $(NEWSCTL)/help: news.help
  75.     $(INSTALL) -c news.help news 644 $(NEWSCTL)/help
  76.  
  77. lib/lib.a:
  78.     : if you do not have ranlib, you will need to edit lib/makefile
  79.     (cd lib; make)
  80.  
  81. $(ROFILES): defs.h
  82.  
  83. # postnews: $(BINDIR)/postnews
  84. # $(BINDIR)/postnews: $(PFILES) defs.h
  85. #     $(CC) $(CFLAGS) $(PFILES) -o postnews
  86. #     $(INSTALL) - postnews news 6711 $(BINDIR)/postnews
  87.  
  88. postgroup: $(BINDIR)/postgroup
  89. $(BINDIR)/postgroup: postgroup.sh
  90.  
  91. uurec: $(NEWSCTL)/uurec
  92. $(NEWSCTL)/uurec: uurec.c defs.h
  93.  
  94. uusend: $(NEWSCTL)/uusend
  95. $(NEWSCTL)/uusend: defs.h uusend.c
  96.  
  97. expire: $(NEWSCTL)/expire
  98. $(NEWSCTL)/expire: $(EFILES) defs.h
  99.     $(CC) $(CFLAGS) $(EFILES) $(NFLAG) -o expire
  100.     $(INSTALL) expire news 700 $(NEWSCTL)/expire
  101.  
  102. postnews.lint: $(PFILES)
  103.     $(LINT) $(PFILES) > postnews.lint
  104.  
  105. readnews.lint: $(RFILES)
  106.     $(LINT) $(RFILES) > readnews.lint
  107.  
  108. expire.lint: $(EFILES)
  109.     $(LINT) $(EFILES) > expire.lint
  110.  
  111. uurec.lint: uurec.c defs.h
  112. uusend.lint: uusend.c defs.h
  113.  
  114. .FINISH:
  115.     rm -s *.o
  116. clean:
  117.     rm -f *.o core a.out readnews
  118.